package com.edu.zhku.wms.common;

/**
 * @author Feng
 * @since 2021/10/24 12:45
 */
public enum  ResultCode {

    SUCCESS(200, "操作成功"),
    ERROR(500, "操作异常"),
    BAD_REQUEST(400, "请求异常！"),
    PARAM_NOT_MATCH(400, "参数不匹配"),
    PARAM_NOT_NULL(400, "参数不能为空！"),
    FORBIDDEN(403, "权限不足"),
    REQUEST_NOT_FOUND(404, "无此请求"),
    HTTP_BAD_METHOD(405, "请求方式不支持！"),
    UNAUTHORIZED(401, "未登录或token过期"),
    USERNAME_PWD_ERROR(5003, "用户名或密码错误"),
    USER_LOCKED(5004, "该用户已被锁定"),
    USER_NOT_ENABLE(5005, "该用户无法使用");

    private Integer code;
    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
